﻿
using System.Data;
public partial class EditSMSLibrary : Frame.Pages.BaseInfomationEditBasePage
{
    //占位符列表
    string[,] book = new string[,] { { "时段", "#Perid_ID#" }, { "客户", "#Consumer_ID#" }, { "预定日期", "#BookDate#" }, { "录入时间", "#AddTime#" }, { "订金单号", "#BookNo#" }, { "订金", "#Money#" }, { "预定类型", "#BookType#" }, { "联系人姓名", "#ContractName#" }, { "联系人电话", "#ContractPhoneNum#" }, { "操作人", "#Operator#" } };
    string[,] care = new string[,] { { "客户", "#Consumer_ID#" }, { "卡号", "#CardNo#" }, { "余额", "#Money#" } };
    string[,] mday = new string[,] { { "客户", "#Consumer_ID#" }, { "纪念日日期", "#MdayDate#" }, { "纪念日内容", "#Remark#" } };

    protected override void Page_Load(object sender, System.EventArgs e)
    {
        base.Page_Load(sender, e);
        Frame.Global.GlobalFunctions.SetGridView(this.gv_PlaceholderList, false);
        if (!IsPostBack && !IsCallback)
        {
            gv_PlaceholderList.DataSource = WebUtility.ConvertToDataTable(book);
            gv_PlaceholderList.DataBind();
        }
    }

    protected void gv_PlaceholderList_CustomCallback(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs e)
    {
        switch (e.Parameters.ToString())
        {
            case "1":
                gv_PlaceholderList.DataSource = WebUtility.ConvertToDataTable(book);
                gv_PlaceholderList.DataBind();
                break;
            case "2":
                gv_PlaceholderList.DataSource = WebUtility.ConvertToDataTable(care);
                gv_PlaceholderList.DataBind();
                break;
            case "3":
                gv_PlaceholderList.DataSource = WebUtility.ConvertToDataTable(mday);
                gv_PlaceholderList.DataBind();
                break;
        }
    }

    /// <summary>
    /// 权限编码，需要重新设置
    /// </summary>
    protected override string ActionID
    {
        get { return "0"; }
    }
}
